<!DOCTYPE html>
<html lang="en" xmlns:el-dialog="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <title>Element UI:Message:消息提示</title>
    <link rel="stylesheet" href="../element/index.css">
    <script src="../js/vue.js"></script>
    <script src="../element/index.js"></script>
</head>
<body>
<div id="app">
    <el-button :plain="true" @click="open1">消息</el-button>
    <el-button :plain="true" @click="open2">成功</el-button>
    <el-button :plain="true" @click="open3">警告</el-button>
    <el-button :plain="true" @click="open4">错误</el-button>
</div>
</body>
<script>
    new Vue({
        el: "#app",
        data: {},
        methods: {
            open1() {
                this.$message('这是一条消息提示');
            },
            open2(){
                this.$message.success('成功');
            },open3(){
                this.$message.warning('警告')
            },open4(){
                this.$message.error('错误')
            }
        }
    })
</script>
</html>